package entity.nvdcve;

import java.util.List;

/**
 * 参考nvd-cve json schema 1.1和cve json 4.0 min 1.1 schema
 * nvd-cve schema地址：https://csrc.nist.gov/schema/nvd/feed/1.1-Beta/nvd_cve_feed_json_1.1_beta.schema
 * cve schema地址：https://csrc.nist.gov/schema/nvd/feed/1.1-Beta/CVE_JSON_4.0_min_1.1_beta.schema
 *
 * @author xym
 * @since 2020/7/15
 */
public class Vulnerability {
    private String cveId;
    private String description;
    private String publishedDate;
    private String lastModifiedDate;

    private Impact impact;
    private List<String> relatedCwes;
    private List<Reference> references;
    private List<BaseProduct> affectedProducts;

    public String getCveId() {
        return cveId;
    }

    public void setCveId(String cveId) {
        this.cveId = cveId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPublishedDate() {
        return publishedDate;
    }

    public void setPublishedDate(String publishedDate) {
        this.publishedDate = publishedDate;
    }

    public String getLastModifiedDate() {
        return lastModifiedDate;
    }

    public void setLastModifiedDate(String lastModifiedDate) {
        this.lastModifiedDate = lastModifiedDate;
    }

    public Impact getImpact() {
        return impact;
    }

    public void setImpact(Impact impact) {
        this.impact = impact;
    }

    public List<String> getRelatedCwes() {
        return relatedCwes;
    }

    public void setRelatedCwes(List<String> relatedCwes) {
        this.relatedCwes = relatedCwes;
    }

    public List<Reference> getReferences() {
        return references;
    }

    public void setReferences(List<Reference> references) {
        this.references = references;
    }

    public List<BaseProduct> getAffectedProducts() {
        return affectedProducts;
    }

    public void setAffectedProducts(List<BaseProduct> affectedProducts) {
        this.affectedProducts = affectedProducts;
    }

    @Override
    public String toString() {
        return "Vulnerability{" +
                "cveId='" + cveId + '\'' +
                ", description='" + description + '\'' +
                ", publishedDate='" + publishedDate + '\'' +
                ", lastModifiedDate='" + lastModifiedDate + '\'' +
                ", impact=" + impact +
                ", relatedCWEs=" + relatedCwes +
                ", references=" + references +
                ", affectedProducts=" + affectedProducts +
                '}';
    }
}
